package com.example.lol.adapter;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.viewholder.BaseViewHolder;
import com.example.demo.R;
import com.example.lol.bean.NewsBean1;

import org.jetbrains.annotations.NotNull;


public class  NewsAdpater1 extends BaseQuickAdapter<NewsBean1, BaseViewHolder> {
    public NewsAdpater1() {
        super(R.layout.item_ct_news);
    }

    @Override
    protected void convert(@NotNull BaseViewHolder baseViewHolder, NewsBean1 newsBean) {
        baseViewHolder.setText(R.id.tv_content, newsBean.getContent());
        baseViewHolder.setText(R.id.tv_lol, newsBean.getTv_lol());
        baseViewHolder.setText(R.id.tv_author, newsBean.getTv_author());
        baseViewHolder.setImageResource(R.id.iv_img, newsBean.getDrawable());
    }
}